#include "Processing/HalfVisitor.hpp"

namespace mif
{
	
	HalfVisitor::HalfVisitor()
	{
		//EMPTY
	}
	
	HalfVisitor::~HalfVisitor()
	{
		//EMPTY
	}
	
	void HalfVisitor::Colored(Mesh & pMesh)
	{
	
		std::cout << "HalfVisitor Processing ..." << std::endl;
		
		for(auto vFaceIt = pMesh.FaceBegin(); vFaceIt != pMesh.FaceEnd(); vFaceIt++){
		
			if((*vFaceIt).GetID() < pMesh.GetNbFace() / 2){
			
				continue;
				
			}else{
			
					RGBA vColor; vColor.r = 255; vColor.g = 0; vColor.b = 0; vColor.a = 0; 
					
					vFaceIt->SetColor(vColor);
		
			}
			
		}
		
	}
	
}
